from PyQt5.QtGui import QColor

fileListWidget_color = QColor(50, 255, 255)
def get_rotation(input_):
    try:
        from PIL import Image, ExifTags
        rotation = 0
        im = Image.open(input_)
        exif = im._getexif()
        rotation = 0
        for orientation in ExifTags.TAGS.keys():
            if not exif: continue
            if exif.get(orientation, 0) == 3:
                rotation = -180
            elif exif.get(orientation, 0) == 6:
                rotation = -270
            elif exif.get(orientation, 0) == 8:
                rotation = -90
        return rotation
    except Exception as e:
        print(str(e))
        return rotation